window.addEventListener('load',function(){
	var td = document.querySelector('.tuoDong');
	var list = document.querySelector('.list');
	
	td.onmousedown = function(e){
		var x = e.offsetX;
		
		window.onmousemove = function(e){
			var left = e.clientX - x - 140;
			
			if(left >= 1200 - 112.7){
				left = 1200 - 112.7;
			}
			if(left <= 0){
				left = 0;
			}
			
			var per = left/1200;
			
			td.style.left = per*100 + '%';
			list.style.left = -per*100 + '%';
		}
		
		td.onmouseup = function(){
			window.onmousemove = null;
		}
	}
})